<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in.2r</name>
<id>-1</id>
<cardCount>108</cardCount>
<cardID>4851</cardID>
<listID>4162</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>on openStackhide message boxset userlevel to 5end openStackon mouseupif the optionkey is not down then exit mouseupelseif the shiftkey is down then edit script of this backgroundelse edit script of targetend ifend mouseupon newcardask "What do you want to name this card?"set cursor to 4put "Please wait while we fix things up for you..."put it into newNameif newName is empty thendomenu delete cardhide messageexit newcardend ifset the name of this card to newNameput newName into field nameset lockscreen to trueput the short name of this background into rememberThispush this cardgo first cardput newName&"," after card field rememberThisput newName&"," after card field indexpop cardset lockscreen to falsehide message windowend newcard----this function will take a word passed to it by the calling script,--check if it is valid, and then go the card whose name is that wore.--function HyperText selectedWord------hypertext technique by Steve Drazga, ART Incorporated--if you use this in your scripts please include these 2 lines.----if space is in SelectedWord then --the user selected more than 1 wordclick at loc of target --so we will clear the selectionexit HyperText --and exit to wait for another selectionend ifpush this cardvisual dissolve to grayvisual dissolvego card selectedWordif the result is not empty thenplay oopsanswer "Can't find that card"end ifend HyperText----this function is used by the 'install' buttons in the--XFCN & XCMD cards. It needs the resource type and resource name--passed to it. It then attempts to install the resource into--a target stack & returns the result.--function installres type, resname----Original script by Steve Drazga, AnalytX--XFCNs used: fileName,--XCMDs used: ResCopy,--HANDLERS used: none--FUNCTIONS used: none--put (long name of this stack) into sourceStackdelete first word of sourceStackdelete first character of sourceStackdelete last character of sourceStackput "Select a stack to copy this "&type&" resource into."put filename("STAK") into fnameif fname is empty then exit installresif sourcestack=fname thenplay "oops"return "Get real. You can't install it in this stack"exit installresend if--ResCopy sourceStack,fname,type,resname--if first char of the result is "E" thenplay oopsanswer "Attempt to install resource has failed."elseanswer type&&"resource installation successful"end ifhide messageend installres---- LastPathComponent -- given a file pathname, returns the last-- component i.e. whatever comes after the last colon, if anything.-- From Dewi Williams--function LastPathComponent name-- scan backwards for the last colon.repeat with i = the length of name down to 1if character i of name is ":" then exit repeatend repeatif i is 1 then-- Name was of the form ":thing" or "thing". Check for leading-- colon, and adjust if necessary. Done for generality.if first character of name is ":" thenput 2 into iend ifelseadd 1 to i -- skip the colonend if-- Name was of the form "Thing:otherthing". Return "otherThing".put empty into lastpathrepeat with j = i to the length of nameput character j of name after lastpathend repeatreturn lastpathend LastPathComponent---- OsErr: for displaying Operating system error codes returned by-- Sublaunch, RenameFile, MoveFile and DeleteFile XFCNs.-- From Dewi Williams--on OsErr err-- Translate the most common onesif err > 0 then -- XFCN conventionput "Parameter error with function" into errstrelse if err is -59 thenput "Problem during rename" into errstrelse if err is